<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::text::OCRTesseract Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d8/de7/namespacecv_1_1text.html">text</a></li><li class="navelem"><a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html">OCRTesseract</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="../../d0/d6e/classcv_1_1text_1_1OCRTesseract-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::text::OCRTesseract Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="../../d4/d61/group__text.html">Scene Text Detection and Recognition</a> » <a class="el" href="../../d8/df2/group__text__recognize.html">Scene Text Recognition</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html" title="OCRTesseract class provides an interface with the tesseract-ocr API (v3.02.02) in C++...">OCRTesseract</a> class provides an interface with the tesseract-ocr API (v3.02.02) in C++.  
 <a href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html#details">More...</a></p>
<p><code>#include &lt;opencv2/text/ocr.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cv::text::OCRTesseract:</div>
<div class="dyncontent">
 <div class="center">
  <img alt="" src="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.png" usemap="#cv::text::OCRTesseract_map"/>
  <map id="cv::text::OCRTesseract_map" name="cv::text::OCRTesseract_map">
<area alt="cv::text::BaseOCR" coords="0,0,139,24" href="../../de/d3a/classcv_1_1text_1_1BaseOCR.html" shape="rect"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af2bb9e7710a5bf616367d8898334001c"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html#af2bb9e7710a5bf616367d8898334001c">run</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;image, std::string &amp;output_text, std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &gt; *component_rects=NULL, std::vector&lt; std::string &gt; *component_texts=NULL, std::vector&lt; float &gt; *component_confidences=NULL, int component_level=0) <a class="el" href="../../db/de0/group__core__utils.html#ga4d89d63e402ef9ddc48e18e21180fe4a">CV_OVERRIDE</a></td></tr>
<tr class="memdesc:af2bb9e7710a5bf616367d8898334001c"><td class="mdescLeft"> </td><td class="mdescRight">Recognize text using the tesseract-ocr API.  <a href="#af2bb9e7710a5bf616367d8898334001c">More...</a><br/></td></tr>
<tr class="separator:af2bb9e7710a5bf616367d8898334001c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4c1a45ae9390021c99363f0aada3f0ea"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html#a4c1a45ae9390021c99363f0aada3f0ea">run</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;image, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;mask, std::string &amp;output_text, std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &gt; *component_rects=NULL, std::vector&lt; std::string &gt; *component_texts=NULL, std::vector&lt; float &gt; *component_confidences=NULL, int component_level=0) <a class="el" href="../../db/de0/group__core__utils.html#ga4d89d63e402ef9ddc48e18e21180fe4a">CV_OVERRIDE</a></td></tr>
<tr class="separator:a4c1a45ae9390021c99363f0aada3f0ea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae53f76683d0267321929e6cda6bb2f03"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html#ae53f76683d0267321929e6cda6bb2f03">run</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, int min_confidence, int component_level=0)</td></tr>
<tr class="separator:ae53f76683d0267321929e6cda6bb2f03"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab2ce0c6ab351e97d7f60a7274c8e9186"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html#ab2ce0c6ab351e97d7f60a7274c8e9186">run</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> mask, int min_confidence, int component_level=0)</td></tr>
<tr class="separator:ab2ce0c6ab351e97d7f60a7274c8e9186"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8da3a4ea4f7fab0f5030a9cf3675b197"><td align="right" class="memItemLeft" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html#a8da3a4ea4f7fab0f5030a9cf3675b197">setWhiteList</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;char_whitelist)=0</td></tr>
<tr class="separator:a8da3a4ea4f7fab0f5030a9cf3675b197"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classcv_1_1text_1_1BaseOCR"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classcv_1_1text_1_1BaseOCR')"><img alt="-" src="../../closed.png"/> Public Member Functions inherited from <a class="el" href="../../de/d3a/classcv_1_1text_1_1BaseOCR.html">cv::text::BaseOCR</a></td></tr>
<tr class="memitem:ad25cbcdcb08369e7268dfc5f3f460a31 inherit pub_methods_classcv_1_1text_1_1BaseOCR"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d3a/classcv_1_1text_1_1BaseOCR.html#ad25cbcdcb08369e7268dfc5f3f460a31">~BaseOCR</a> ()</td></tr>
<tr class="separator:ad25cbcdcb08369e7268dfc5f3f460a31 inherit pub_methods_classcv_1_1text_1_1BaseOCR"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a391b1e753f0b779b72204ec15200a99a"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html">OCRTesseract</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html#a391b1e753f0b779b72204ec15200a99a">create</a> (const char *datapath=NULL, const char *language=NULL, const char *char_whitelist=NULL, int oem=<a class="el" href="../../d8/df2/group__text__recognize.html#gga91c5c4396fea4192c6bf5a8b2eba871aa8323b4ed6d93e0dd6b2656dd4eaa11c3">OEM_DEFAULT</a>, int psmode=<a class="el" href="../../d8/df2/group__text__recognize.html#gga32b394fdfb46625c2134d5456c78576ba592c3b182ce902537d8aaed3e00d4d8c">PSM_AUTO</a>)</td></tr>
<tr class="memdesc:a391b1e753f0b779b72204ec15200a99a"><td class="mdescLeft"> </td><td class="mdescRight">Creates an instance of the <a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html" title="OCRTesseract class provides an interface with the tesseract-ocr API (v3.02.02) in C++...">OCRTesseract</a> class. Initializes Tesseract.  <a href="#a391b1e753f0b779b72204ec15200a99a">More...</a><br/></td></tr>
<tr class="separator:a391b1e753f0b779b72204ec15200a99a"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html" title="OCRTesseract class provides an interface with the tesseract-ocr API (v3.02.02) in C++...">OCRTesseract</a> class provides an interface with the tesseract-ocr API (v3.02.02) in C++. </p>
<p>Notice that it is compiled only when tesseract-ocr is correctly installed.</p>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>(C++) An example of <a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html" title="OCRTesseract class provides an interface with the tesseract-ocr API (v3.02.02) in C++...">OCRTesseract</a> recognition combined with scene text detection can be found at the end_to_end_recognition demo: <a href="https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/end_to_end_recognition.cpp">https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/end_to_end_recognition.cpp</a><ul>
<li>(C++) Another example of <a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html" title="OCRTesseract class provides an interface with the tesseract-ocr API (v3.02.02) in C++...">OCRTesseract</a> recognition combined with scene text detection can be found at the webcam_demo: <a href="https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/webcam_demo.cpp">https://github.com/opencv/opencv_contrib/blob/master/modules/text/samples/webcam_demo.cpp</a> </li>
</ul>
</li>
</ul>
</dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a391b1e753f0b779b72204ec15200a99a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a391b1e753f0b779b72204ec15200a99a">◆ </a></span>create()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html">OCRTesseract</a>&gt; cv::text::OCRTesseract::create </td>
          <td>(</td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>datapath</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>language</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>char_whitelist</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>oem</em> = <code><a class="el" href="../../d8/df2/group__text__recognize.html#gga91c5c4396fea4192c6bf5a8b2eba871aa8323b4ed6d93e0dd6b2656dd4eaa11c3">OEM_DEFAULT</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>psmode</em> = <code><a class="el" href="../../d8/df2/group__text__recognize.html#gga32b394fdfb46625c2134d5456c78576ba592c3b182ce902537d8aaed3e00d4d8c">PSM_AUTO</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text.OCRTesseract_create(</td><td class="paramname">[, datapath[, language[, char_whitelist[, oem[, psmode]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Creates an instance of the <a class="el" href="../../d7/ddc/classcv_1_1text_1_1OCRTesseract.html" title="OCRTesseract class provides an interface with the tesseract-ocr API (v3.02.02) in C++...">OCRTesseract</a> class. Initializes Tesseract. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">datapath</td><td>the name of the parent directory of tessdata ended with "/", or NULL to use the system's default directory. </td></tr>
    <tr><td class="paramname">language</td><td>an ISO 639-3 code or NULL will default to "eng". </td></tr>
    <tr><td class="paramname">char_whitelist</td><td>specifies the list of characters used for recognition. NULL defaults to "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ". </td></tr>
    <tr><td class="paramname">oem</td><td>tesseract-ocr offers different OCR Engine Modes (OEM), by default tesseract::OEM_DEFAULT is used. See the tesseract-ocr API documentation for other possible values. </td></tr>
    <tr><td class="paramname">psmode</td><td>tesseract-ocr offers different Page Segmentation Modes (PSM) tesseract::PSM_AUTO (fully automatic layout analysis) is used. See the tesseract-ocr API documentation for other possible values. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="af2bb9e7710a5bf616367d8898334001c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2bb9e7710a5bf616367d8898334001c">◆ </a></span>run() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::text::OCRTesseract::run </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp; </td>
          <td class="paramname"><em>output_text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &gt; * </td>
          <td class="paramname"><em>component_rects</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::string &gt; * </td>
          <td class="paramname"><em>component_texts</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; float &gt; * </td>
          <td class="paramname"><em>component_confidences</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>component_level</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text_OCRTesseract.run(</td><td class="paramname">image, min_confidence[, component_level]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text_OCRTesseract.run(</td><td class="paramname">image, mask, min_confidence[, component_level]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Recognize text using the tesseract-ocr API. </p>
<p>Takes image on input and returns recognized text in the output_text parameter. Optionally provides also the Rects for individual text elements found (e.g. words), and the list of those text elements with their confidence values.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>Input image CV_8UC1 or CV_8UC3 </td></tr>
    <tr><td class="paramname">output_text</td><td>Output text of the tesseract-ocr. </td></tr>
    <tr><td class="paramname">component_rects</td><td>If provided the method will output a list of Rects for the individual text elements found (e.g. words or text lines). </td></tr>
    <tr><td class="paramname">component_texts</td><td>If provided the method will output a list of text strings for the recognition of individual text elements found (e.g. words or text lines). </td></tr>
    <tr><td class="paramname">component_confidences</td><td>If provided the method will output a list of confidence values for the recognition of individual text elements found (e.g. words or text lines). </td></tr>
    <tr><td class="paramname">component_level</td><td>OCR_LEVEL_WORD (by default), or OCR_LEVEL_TEXTLINE. </td></tr>
  </table>
  </dd>
</dl>
<p>Implements <a class="el" href="../../de/d3a/classcv_1_1text_1_1BaseOCR.html#a5c67898881a8d309eb805811e574f9c5">cv::text::BaseOCR</a>.</p>
</div>
</div>
<a id="a4c1a45ae9390021c99363f0aada3f0ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c1a45ae9390021c99363f0aada3f0ea">◆ </a></span>run() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::text::OCRTesseract::run </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string &amp; </td>
          <td class="paramname"><em>output_text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &gt; * </td>
          <td class="paramname"><em>component_rects</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::string &gt; * </td>
          <td class="paramname"><em>component_texts</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; float &gt; * </td>
          <td class="paramname"><em>component_confidences</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>component_level</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text_OCRTesseract.run(</td><td class="paramname">image, min_confidence[, component_level]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text_OCRTesseract.run(</td><td class="paramname">image, mask, min_confidence[, component_level]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Implements <a class="el" href="../../de/d3a/classcv_1_1text_1_1BaseOCR.html#acffec5372da8bb875e5d04acc8c5410a">cv::text::BaseOCR</a>.</p>
</div>
</div>
<a id="ae53f76683d0267321929e6cda6bb2f03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae53f76683d0267321929e6cda6bb2f03">◆ </a></span>run() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> cv::text::OCRTesseract::run </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>min_confidence</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>component_level</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text_OCRTesseract.run(</td><td class="paramname">image, min_confidence[, component_level]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text_OCRTesseract.run(</td><td class="paramname">image, mask, min_confidence[, component_level]</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="ab2ce0c6ab351e97d7f60a7274c8e9186"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2ce0c6ab351e97d7f60a7274c8e9186">◆ </a></span>run() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> cv::text::OCRTesseract::run </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>mask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>min_confidence</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>component_level</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text_OCRTesseract.run(</td><td class="paramname">image, min_confidence[, component_level]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.text_OCRTesseract.run(</td><td class="paramname">image, mask, min_confidence[, component_level]</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="a8da3a4ea4f7fab0f5030a9cf3675b197"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8da3a4ea4f7fab0f5030a9cf3675b197">◆ </a></span>setWhiteList()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void cv::text::OCRTesseract::setWhiteList </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>char_whitelist</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.text_OCRTesseract.setWhiteList(</td><td class="paramname">char_whitelist</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/text/<a class="el" href="../../db/d5e/ocr_8hpp.html">ocr.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:48 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
